Q: How should I use the various NetInfo command-line utilities?\
\
A: Improper use of
\f0 niload(1)
\f2 and
\f0 nidump(1)
\f2 can cause information loss, and, perhaps, an unusable NetInfo database. Based on our experience, we recommend using these utilities in specific situations only. In general, most NetInfo maintenance should be done using NetInfoManager and NetManager, or, if you insist on a tty-based interface,
\f0 niutil(1)
\f2 .\
\
As an example of some of the dangers in using
\f0 niload
\f2 and
\f0 nidump
\f2 , let's look at a very common use of these: maintenance of the hosts database (the
\f0 /machines
\f2 directory in NetInfo). In order for NetInfo to function properly, the local domain must have an entry in its
\f2 will lose the serves property, and that there's no way to specify it using solely
\f0 niload
\f2 . Without these entries, NetInfo will not function properly (symptoms may include an inability to connect to a NetInfo server).\
\
We have talked with customers who who wanted to “clean out” their
\f0 /machines
\f2 directory. One might think that a simple and appropriate way to do this is to use\
\
\f0 echo "" | niload hosts -d /\
\
\f2 If the system is then rebooted, there will be no information to allow NetInfo to find the Configuration Server for the
\b root
\b0 domain, or for other, perhaps necessary, subsidiary domains.\
\
What about
\f0 nidump
\f2 ? Because there's more information in a NetInfo database than in the corresponding UNIX flat-file, information can be lost using
\f0 nidump
\f2 . For example, there's no way using just
\f0 nidump
\f2 to determine which machines serve which domains. (A sample Bourne shell script which “dumps” all the properties in a NetInfo directory is in the NextAnswer in netinfo.362, or search in the Digital Librarian for “niprint.”) Also, netgroups are specified for each machine, in that machine's NetInfo
At NeXT Tech Support, we use some “non-standard” properties, such as the
\i Comments
\i0 property, above. Only NetInfoManager or
\f0 niutil
\f2 will show these properties.\
\
So, when should
\f0 niload
\f2 be used? We recommend using it only to bulk-load a large, existing system administration database, or to keep things synchronized in a heterogenous network when the primary location at which network administration is performed is a non-NeXT computer
\b and
\b0 the caveats mentioned here are noted and honored. Be careful using
\f0 niload
\f2 's
\f0 -d
\f2 option. You might consider using an appropriate NeXT machine as your base for network administration, and using
\f0 nidump
\f2 and, for example,
\f0 rcp(1)
\f2 or
\f0 rsh(1)
\f2 to transfer data and load them into another administrative mechanism.\
\
QA476\
\
\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320 Valid for 1.0\